cmake_minimum_required(VERSION 3.5)
project(cartpole_examples LANGUAGES CXX)
add_definitions(-std=c++14)

find_package(casadi REQUIRED)
set(Eigen3_DIR /usr/include)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
add_definitions(${EIGEN_DEFINITIONS})

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

add_library(cartpole_solver src/solver.cpp)
target_link_libraries(cartpole_solver casadi)

add_executable(mytest src/test.cpp)
target_link_libraries(mytest cartpole_solver)

add_executable(simpletest src/simple_test.cpp)
target_link_libraries(simpletest cartpole_solver)

add_executable(swingup1 src/CartPoleSwingUp.cpp src/cartPoleSystem.cpp)
target_link_libraries(swingup1 casadi)